<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>简易选项卡</title>
    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
        }




        h3 {
            font-weight: bold;
            text-align: center;
        }

        a {
            position: relative;
        }

        #all {
            margin-left: auto;
            margin-right: auto;
            width: 400px;
            height: 200px;
            padding: 20px;
            background-color: #EDEDED;
            border: 1.5px solid #000;
            line-height: 23px;
        }

        #div1 a {
            text-decoration: none;
            color: #846CD5
        }

        #tab a {
            position: relative;
            text-decoration: none;
            color: #000;
        }

        #div1 a:hover {
            color: #000;
        }

        #tab a:hover {
            color: #686C6F;
        }

        #tab {
            background-color: #FBFCC5;
            border-top: 1px solid #C3C2AE;
            border-left: 1px solid #DED68B;
            border-right: 1px solid #DED68B;
            border-bottom: 1px solid #DED68B;
            margin: 0px 0px -1px 0px;
        }

        #tab2 {
            background-color: #FBFCC5;
            border-left: 1px solid #DED68B;
            border-right: 1px solid #DED68B;
            border-top: 1px solid #DED68B;
        }

        #tab2 a {
            position: relative;
            text-decoration: none;
            color: #000;
        }

        #tab2 a:hover {
            color: #686C6F;
        }
    </style>
</head>

<body>
    <h3>门户网站</h3>

    <div id="all">
        <div id="div1">
            <a href="#">新闻</a>&nbsp;&nbsp;
            <a href="#">讨论</a>&nbsp;&nbsp;
            <a href="#">留言</a>
        </div>
        <div id="tab2">
            <a href="#"><span class="content">这是新闻的内容1</span></a>
        </div>
        <div id="tab">
            <a href="#"><span class="content">这是新闻的内容2</span></a>
        </div>
        <div id="tab">
            <a href="#"><span class="content">这是新闻的内容3</span></a>
        </div>

    </div>
</body>

</html>
